New Functions in Week 8

as.character

{base}

Coerce a vector to character

read_dta

{haven}

Read a .dta file (Stata data)

n

{dplyr}

The number of observations in the current group.

summarize

NA

table

{base}

Obtain frequency table of a variable/cross-tabulation of two variables

spread

{tidyr}

Spread a key-value pair across multiple columns

ordered

{dplyr}

Create an ordered factor

write_dta

NA

save

{base}

Writes an external representation of R objects to the specified file.

data.frame

{base}

Create a data.frame from vectors

is.na

{base}

Check if a value is NA/elements of vector are NA

separate

{dplyr}

Separate a character column into multiple columns

as.numeric

{base}

Coerce a vector to numeric

write.csv

{utils}

write a csv file to a data frame

The end!